package com.innovate.cms.modules.qs.entity.order;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.innovate.cms.common.persistence.DataEntity;

/**
 * 订单
 * 
 * @author shifangfang
 * @date 2017年12月27日 下午5:49:12
 */
public class DbOrder extends DataEntity<DbOrder> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@JSONField(name = "order_id")
	private int orderId;
	@JSONField(name = "trade_no")
	private String tradeNo;
	@JSONField(name = "consumer_uid")
	private String consumerUid;
	private String mobile;
	@JSONField(name = "business_uid")
	private String businessUid;

	@JSONField(name = "business_address")
	private String businessAddress;
	@JSONField(name = "business_name")
	private String businessName;
	private String pics;
	private String title;

	private int mid;
	private double price;
	private int num;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(name = "create_time")
	private Date createTime;
	@JsonFormat(pattern = "yyyy-MM-dd")
	@JSONField(name = "consume_time")
	private Date consumeTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(name = "msg_date")
	private Date msgDate;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(name = "msg_end_date")
	private Date msgEndDate;

	@JSONField(name = "consume_state")
	private int consumeState;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(name = "update_time")
	private Date updateTime;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JSONField(name = "clearing_time")
	private Date clearingTime;
	@JSONField(name = "clearing_state")
	private int clearingState;
	@JSONField(name = "pay_type")
	private int payType;
	@JSONField(name = "order_state")
	private int orderState;

	@JSONField(name = "transaction_id")
	private String transactionId;// 微信/支付宝支付订单号

	// `order_id` int(11) NOT NULL,
	// `trade_no` varchar(32) NOT NULL COMMENT '订单号',
	// `consumer_uid` varchar(32) NOT NULL COMMENT '消费uid',
	// `mobile` varchar(13) DEFAULT '' COMMENT '下单用户手机号',

	// `business_uid` varchar(32) NOT NULL COMMENT '商家id',
	// `business_address` varchar(255) DEFAULT '' COMMENT '商家地址',
	// `business_name` varchar(128) DEFAULT '' COMMENT '商家名',
	// `mid` int(11) NOT NULL COMMENT '商品id',
	// `price` decimal(20,2) DEFAULT NULL COMMENT '订单付款金额',
	// `num` smallint(6) DEFAULT '1' COMMENT '购买数量',
	// `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单生成时间',
	// `consume_time` date DEFAULT '1900-01-01' COMMENT '核销时间,实际消费时间',
	// `msg_date` timestamp NULL DEFAULT NULL COMMENT '活动开始时间',
	// `msg_end_date` timestamp NULL DEFAULT '1980-01-01 08:01:01' COMMENT
	// '活动结束时间-订单有效期',
	// `consume_state` tinyint(4) DEFAULT '0' COMMENT '核销状态:0-未实际消费 1-商家确认客户已经消费
	// 2-过期',
	// `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
	// CURRENT_TIMESTAMP COMMENT '订单最后一次更新时间',
	// `clearing_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT
	// '结算时间:配合运营手动更新',
	// `clearing_state` tinyint(4) DEFAULT '0' COMMENT '结算状态-配合运营手动更新: 0-未结算
	// 1-已结算',
	// `pay_type` tinyint(4) DEFAULT '0' COMMENT '支付类型:0-微信 1-支付宝',

	public DbOrder() {
		super();
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPics() {
		return pics;
	}

	public void setPics(String pics) {
		this.pics = pics;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public int getOrderId() {
		return orderId;
	}

	public void setOrderId(int orderId) {
		this.orderId = orderId;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public String getConsumerUid() {
		return consumerUid;
	}

	public void setConsumerUid(String consumerUid) {
		this.consumerUid = consumerUid;
	}

	public String getBusinessUid() {
		return businessUid;
	}

	public void setBusinessUid(String businessUid) {
		this.businessUid = businessUid;
	}

	public int getMid() {
		return mid;
	}

	public void setMid(int mid) {
		this.mid = mid;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getConsumeTime() {
		return consumeTime;
	}

	public void setConsumeTime(Date consumeTime) {
		this.consumeTime = consumeTime;
	}

	public String getBusinessAddress() {
		return businessAddress;
	}

	public void setBusinessAddress(String businessAddress) {
		this.businessAddress = businessAddress;
	}

	public String getBusinessName() {
		return businessName;
	}

	public void setBusinessName(String businessName) {
		this.businessName = businessName;
	}

	public Date getMsgDate() {
		return msgDate;
	}

	public void setMsgDate(Date msgDate) {
		this.msgDate = msgDate;
	}

	public Date getMsgEndDate() {
		return msgEndDate;
	}

	public void setMsgEndDate(Date msgEndDate) {
		this.msgEndDate = msgEndDate;
	}

	public int getConsumeState() {
		return consumeState;
	}

	public void setConsumeState(int consumeState) {
		this.consumeState = consumeState;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getClearingTime() {
		return clearingTime;
	}

	public void setClearingTime(Date clearingTime) {
		this.clearingTime = clearingTime;
	}

	public int getClearingState() {
		return clearingState;
	}

	public void setClearingState(int clearingState) {
		this.clearingState = clearingState;
	}

	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	public int getOrderState() {
		return orderState;
	}

	public void setOrderState(int orderState) {
		this.orderState = orderState;
	}

}
